<% room.beds.each do |bed| -%>
  <% remote_form_for bed, :html => {:class => 'inline'} do |bed_fields| -%>
    <%= bed_fields.check_box :occupied, :onChange => "$('edit_bed_#{bed.id}').submit();" %>
  <% end -%>
<% end -%>